package com.crl.module.eventParser
{
	import com.crl.core.IDispose;
	
	import flash.events.Event;
	import flash.utils.getQualifiedClassName;
	
	
	/**
	 * 
	 * @author crl
	 * 
	 */	
	public class AbstractEventParser implements IEventParser ,IDispose
	{
		protected var type:String;
		protected var events:Vector.<String>
		protected var parserFactory:IEventParserFactory;
		public function AbstractEventParser()
		{
		}
		
		public function getType():String
		{
			return this.type;
		}
		
		public function toParse(event:Event):void
		{
			//sub class todo override it;
		}
		
		public function set factory(factory:IEventParserFactory):void{
			this.parserFactory=factory;
		}
		
		public function getEvents():Vector.<String>
		{
			return this.events;
		}
		
		protected function getClassType(cls:Class):String{
			return getQualifiedClassName(cls);
		}
		
		public function dispose():void
		{
		}
	}
}